import Vue from 'vue'
import VueRouter from 'vue-router'
import manage from './dynamic-router'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/manage'
  },
  ...manage,
  {
    path: '/403',
    component: ()=>import('@/components/errorPage/403.vue'),
  },
  {
    path: '*',
    component: ()=>import('@/components/errorPage/404.vue'),
  },
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})


export default router
